//
//  LZYSelectPhotoView.h
//  Supervisor
//
//  Created by 小宇 on 2017/5/18.
//  Copyright © 2017年 北京怀教网络科技股份有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LZYPhotoModel.h"


typedef void(^LZYMediaHeightBlock)(CGFloat mediaHeight);

typedef void(^LZYSelectMediaBackBlock)(NSArray<LZYPhotoModel *> *list);

typedef void(^LZYPhotoZeroBlock)(NSInteger photoZero);

@interface LZYSelectPhotoView : UIView
//ACSelectMediaBackBlock
@property (nonatomic, strong) NSArray *preShowMedias;

/**
 * 最大资源选择个数,（包括 preShowMedias 预先展示数据）. default is 9
 */
@property (nonatomic, assign) NSInteger maxImageSelected;
//当前的主控制器
@property (nonatomic, strong) UIViewController *rootViewController;
//底部collectionView的 backgroundColor
@property (nonatomic, strong) UIColor *backgroundColor;
/**
 * 是否需要显示添加按钮. Defaults is YES
 */
@property (nonatomic, assign) BOOL showAddButton;

/**
 * 是否需要显示添加按钮. Defaults is YES
 */
@property (nonatomic, assign) BOOL hideDeleteButton;

@property (nonatomic, copy) LZYPhotoZeroBlock zeroBlock;

#pragma mark - methods

/**
 * 监控view的高度变化，如果不和其他控件一起使用，则可以不用监控高度变化
 */
- (void)observeViewHeight: (LZYMediaHeightBlock)value;

/**
 * 随时监控当前选择到的媒体文件
 */
- (void)observeSelectedMediaArray: (LZYSelectMediaBackBlock)backBlock;

- (CGFloat)getCollectionViewHeightWithPhotoCount:(NSInteger)photoCount;
/**
 * 视图一开始默认高度
 */
+ (CGFloat)defaultViewHeight;

/**
 * 刷新
 */
- (void)reload;

- (NSArray *)getAllPhotos;

- (NSArray *)getLocalPhotos;

- (NSArray *)getFilePathPhotos;

- (NSArray *)getUrlPhotos;

- (void)openAlbum;

- (void)openCamera;

- (void)setPreShowMedias:(NSArray *)preShowMedias;
- (void)setHideDeletebutton;
- (void)setShowDeletebutton;

@end
